[index]

OptionKey Function

Syntax

the optionKey or optionKey()

Description

The optionKey function indicates whether the Alt key is being pressed. If the Alt key is being pressed, the function returns down; if the Alt key is not being pressed, the function returns up. The Option key on the Macintosh keyboard and the Alt key on the PC keyboard are equivalent in the Oracle Media Objects environment. When placed in a card-level script, the following handlers allow the user to click on and drag any object. However, if the user clicks on the object while holding down the Alt key, Oracle Media Objects creates a duplicate of the object, which remains in the original object's position.

Examples

on mouseStillDown set the location of the target to the mouseLoc end mouseStillDown The following handler checks the status of the Alt/Option key and, if it is down, creates a copy of the target object. on mouseDown if the optionKey is "down" then lock screen set the hilite of the target to false select the target Copy choose Browse tool Paste unlock screen else set the location of the target to the mouseLoc end if
This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.